'use strict';
const holder = document.getElementById('holder');
holder.ondragover = () => {
    return false;
}
holder.ondragleave = holder.ondragend = () => {
    return false;
}
holder.ondrop = (e) => {
    e.preventDefault()
    for (let f of e.dataTransfer.files) {
        var changer=new Changer({
        	path:f.path,
        	year:2017,
        	month:3
        });

        function whenConvert(){
            changer.save();
        };

        changer.do();

        holder.innerHTML='<i class="fa fa-file-excel-o" aria-hidden="true"></i>';
        var div=document.createElement('div');
        div.style.cursor='pointer';
        div.innerHTML='Click here to Save';
        div.onclick=whenConvert;
        holder.appendChild(div);
    }
    return false;
}
